import QtQuick 2.0
import "../../../customqml"
Rectangle{
    Loader{
        id:viewsLoader
        anchors.centerIn: parent
        anchors.fill: parent
    }
    NormalBtn{
        x:220
        y:100
        id:bt_1
        text: "基础视图模型1"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/BaseViewModel_Test1.qml"
                }
            }
        }
    }
    NormalBtn{
        x:320
        y:100
        id:bt_2
        text: "基础模型视图2"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/BaseViewModel_Test2.qml"
                }
            }
        }
    }
    NormalBtn{
        x:420
        y:100
        id:bt_3
        text: "动态视图---简单链表"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/DynamicView_List1.qml"
                }
            }
        }
    }
    NormalBtn{
        x:520
        y:100
        id:bt_4
        text: "动态视图---简单链表2"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/DynamicView_List2.qml"
                }
            }
        }
    }
    NormalBtn{
        x:620
        y:100
        id:bt_5
        text: "动态视图---简单链表3"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/DynamicView_List3.qml"
                }
            }
        }
    }
    NormalBtn{
        x:720
        y:100
        id:bt_6
        text: "动态视图---简单链表4"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/DynamicView_List4.qml"
                }
            }
        }
    }
    NormalBtn{
        x:820
        y:100
        id:bt_7
        text: "动态视图---网格"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/DynamicView_Grid.qml"
                }
            }
        }
    }
    NormalBtn{
        x:220
        y:200
        id:bt_8
        text: "高级视图用法---路径视图"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/AdvancedView_PathView.qml"
                }
            }
        }
    }
    NormalBtn{
        x:420
        y:200
        id:bt_9
        text: "高级视图用法---XML视图"
        MouseArea{
            anchors.fill: parent
            acceptedButtons: Qt.LeftButton
            onClicked: {
                if(mouse.button===Qt.LeftButton)
                {
                    viewsLoader.source="/qml/main/QmlInBookMain/ViewModelSub/AdvancedView_XMLView.qml"
                }
            }
        }
    }
}


